﻿using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;

namespace RuYiAdmin.Net.Entity.CoreEntity
{
    /// <summary>
    /// 动作执行结果
    /// </summary>
    public class ActionResult
    {
        /// <summary>
        /// HttpStatusCode
        /// </summary>
        public HttpStatusCode HttpStatusCode { get; set; }

        /// <summary>
        /// 执行消息
        /// </summary>
        public String Message { get; set; }

        /// <summary>
        /// 执行对象
        /// </summary>
        public Object Object { get; set; }

        /// <summary>
        /// 序列化对象
        /// </summary>
        /// <returns>json字符串</returns>
        public String ToJson()
        {
            return JsonConvert.SerializeObject(this);
        }
    }
}
